import com.alibaba.dubbo.container.Main;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import top.swimmer.dubbo.provider.service.DemoService;

public class Demo {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("demo-consumer.xml");
        context.start();
        DemoService demoService = (DemoService)context.getBean("demoService", DemoService.class); // 获取远程服务代理
        String hello = demoService.sayHello("carl"); // 执行远程方法
        System.out.println( hello ); // 显示调用结果
    }
}
